home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / drive_1r / foneanno.frm (.txt) next >
Encoding:
Visual Basic Form  |  1999-04-11  |  2.9 KB  |  103 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Phone Annoyer"
  4.    ClientHeight    =   2310
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   3570
  8.    Icon            =   "FoneAnnoy.frx":0000
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    ScaleHeight     =   115.5
  12.    ScaleMode       =   2  'Point
  13.    ScaleWidth      =   178.5
  14.    StartUpPosition =   1  'CenterOwner
  15.    Begin VB.Timer Timer2 
  16.       Interval        =   455
  17.       Left            =   480
  18.       Top             =   720
  19.    End
  20.    Begin VB.Timer Timer1 
  21.       Enabled         =   0   'False
  22.       Interval        =   500
  23.       Left            =   0
  24.       Top             =   720
  25.    End
  26.    Begin VB.TextBox Text1 
  27.       Alignment       =   2  'Center
  28.       Height          =   285
  29.       Left            =   1200
  30.       TabIndex        =   2
  31.       Top             =   120
  32.       Width           =   1215
  33.    End
  34.    Begin VB.CommandButton Command1 
  35.       Caption         =   "&Begin"
  36.       Height          =   495
  37.       Left            =   1320
  38.       TabIndex        =   0
  39.       Top             =   720
  40.       Width           =   975
  41.    End
  42.    Begin VB.Label Label2 
  43.       Alignment       =   2  'Center
  44.       Caption         =   "Times:"
  45.       Height          =   255
  46.       Left            =   600
  47.       TabIndex        =   3
  48.       Top             =   120
  49.       Width           =   495
  50.    End
  51.    Begin VB.Label Label1 
  52.       Alignment       =   2  'Center
  53.       AutoSize        =   -1  'True
  54.       Caption         =   "0"
  55.       Height          =   195
  56.       Left            =   1080
  57.       TabIndex        =   1
  58.       Top             =   1560
  59.       Width           =   1425
  60.    End
  61. Attribute VB_Name = "Form1"
  62. Attribute VB_GlobalNameSpace = False
  63. Attribute VB_Creatable = False
  64. Attribute VB_PredeclaredId = True
  65. Attribute VB_Exposed = False
  66. Private Sub Command1_Click()
  67. Do Until Label1.Caption = Text1.Text
  68. Timer1.Enabled = True
  69. PhoneNumber$ = "123-4567"
  70. Open "COM2:" For Output As #1 'or COM1
  71. Print #1, "ATDT" & PhoneNumber$ & Chr$(13)
  72. Label1.Caption = Label1.Caption + 1
  73. Close #1
  74. End Sub
  75. Private Sub Form_Resize()
  76. On Error GoTo a
  77. Form1.Height = 2715
  78. Form1.Width = 3690
  79. End Sub
  80. Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
  81. Select Case KeyCode
  82.    Case vbKeyReturn:
  83.         Do Until Label1.Caption = Text1.Text
  84.         Timer1.Enabled = True
  85.         PhoneNumber$ = "123-4567"
  86.         Open "COM2:" For Output As #1 'or COM1
  87.         Print #1, "ATDT" & PhoneNumber$ & Chr$(13)
  88.         Label1.Caption = Label1.Caption + 1
  89.         Close #1
  90.                 Loop
  91.     End Select
  92. End Sub
  93. Private Sub Timer1_Timer()
  94. If Label1.Caption = Text1.Text Then
  95. Label1.Caption = "0"
  96. End If
  97. End Sub
  98. Private Sub Timer2_Timer()
  99.     Dim a
  100. a = Int(Rnd * 15) + 1
  101. Text1.ForeColor = QBColor(a)
  102. End Sub
  103.